<?php
require_once '../Controllers/SessionController.php';
if (!verificaLogin())
    return;
if (!verificaTorneo())
    return;
$torneo = $_SESSION["torneo"];
?>

<script type="text/javascript" src="./Fuentes/js/HabilitarJuego.js"></script>
<script type="text/javascript" src="../../Resources/js/utils.js"></script>
<div class="modal fade" id="habilitarJuego" tabindex="-1" role="dialog" keyboard="true" 
     aria-labelledby="habilitarJuegoLabel" aria-hidden="true" >
    <div class="modal-dialog " style="width: 410px;">        
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Cerrar</span></button>
                <h4 class="modal-title" ><span class="glyphicon glyphicon-ok-circle"></span> HABILITAR JUEGO</h4>
            </div>

            <form role="form" id="formHabilitarJuego" autocomplete="off" >
                <div class="modal-body">
                    <div class="row">
                        <div class="col-sm-8">
                            <div class="form-group">
                                <label class="control-label">Poker Clock IP</label>
                                <input type="text" class="form-control text-center" style="font-weight: bold; font-size: 17px;" 
                                       id="cmpPokerClock" name="cmpPokerClock" placeholder="DIRECCION IP" 
                                       value="<?php echo ($torneo['poker_clock'] != NULL) ? $torneo['poker_clock'] : ''; ?> ">
                            </div>
                        </div>
                        <div class="col-sm-4">
                            <div class="form-group">
                                <label class="control-label">Nivel Inicial</label>
                                <input type="text" class="form-control text-center numeroEntero" style="font-weight: bold; font-size: 17px;" 
                                       id="cmpNivel" name="cmpNivel" placeholder="NIVEL" maxlength="3" 
                                       value="<?php echo ($torneo['nivel_actual'] != NULL) ? $torneo['nivel_actual'] : '1'; ?> ">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer " id="footer" >
                    <div class="row">
                        <div id="formMensaje" class="col-sm-7 text-left text-warning">
                            &nbsp;
                        </div>
                        <div class="col-sm-5">
                            <button type="submit" class="btn btn-success btn-block " id="aceptar" >HABILITAR</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type='text/javascript'> $('#habilitarJuego').modal('show');</script>